﻿using StudentCouncil.DAL.DAO;
using StudentCouncil.Model;
using StudentCouncil.Model.Models;
using StudentCouncil.Model.Parameter;
using System;
using System.Collections.Generic;
using System.Text;

namespace StudentCouncil.BLL.Mgr
{
    public class AssociationMgr
    {
        public static Pager<Association> GetAssociationListByPage(AssociationParameter parameter)
        {
            return AssociationDAO.GetListByPage(parameter);
        }
        public static bool AssociationDeleteById(int id)
        {
            return AssociationDAO.DeleteById(id);
        }
        public static bool BatchDelete(string ids)
        {
            string[] array = ids.Split(',');
            return AssociationDAO.BatchDelete(array);
        }
        public static bool AddAssociation(Association entity)
        {
            return AssociationDAO.AddAssociation(entity);
        }
        public static Associationstatus AddAssociationstatus(Associationstatus entity)
        {
            return AssociationDAO.AddAssociationstatus(entity);
        }
        public static Association GetAssociationById(int id)
        {
            return AssociationDAO.GetAssociationById(id);
        }

        public static bool CheckAssociationById(int id)
        {
            Association result = AssociationDAO.GetAssociationById(id);
            return result != null;
        }
        public static bool AssociationUpdate(Association entity)
        {
            return AssociationDAO.Update(entity);
        }
        public static bool AssociationstatusUpdate(Associationstatus entity)
        {
            return AssociationDAO.Updatestatus(entity);
        }
        public static Pager<Associationstatus> GetAssociationstatusListByPage(AssociationstatusParameter parameter)
        {
            return AssociationDAO.GetAssociationstatusListByPage(parameter);
        }


        public static bool Updatewenjian(Associationstatus entity) {
            return AssociationDAO.Updatewenjian(entity);
        }
        public static bool UpdateVideostatus(Associationstatus entity)
        {
            return AssociationDAO.UpdateVideo(entity);
        }
     }
}
